﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace BaseUtils.AppConfig
{
    public class Security : RootBase
    {
        [XmlElement("role")]
        public List<Role> Roles { get; set; }

        [XmlElement("page")]
        public List<Page> Pages { get; set; }
    }

    public class Page : RootBase
    {
        [XmlAttribute("name")]
        public string Name { get; set; }

        [XmlElement("button")]
        public List<Button> Buttons { get; set; }

    }

    public class Button : RootBase
    {

        [XmlAttribute("name")]
        public string Name { get; set; }

        [XmlAttribute("levle")]
        public int Level { get; set; }

        [XmlAttribute("parent")]
        public string Parent { get; set; }
    }

    public class Role : RootBase
    {

        [XmlAttribute("name")]
        public string Name { get; set; }

        [XmlAttribute("level")]
        public int Level { get; set; }
    }

}
